package com.zyong.design.pattern.state.case3;

/**
 * 已发布
 * @program: zyong-design-pattern
 * @ClassName: PublishState
 * @author: zyong
 * @create: 2024-03-24 22:12
 */
public class PublishState extends AbstractState {
    @Override
    public void acceptOrderEvent(Context context) {
        // 把当前状态设置为NotPayState
        // 至于应该变成哪个状态，由流程图决定
        context.setState(new NotPayState());
    }

    @Override
    public void notPeopleAcceptEvent(Context context) {
        context.setState(new FeedBackState());
    }

    @Override
    public String getCurrentState() {
        return StateEnum.PUBLISHED.getValue();
    }
}
